package com.ssy.lingxi.report.controller.mobile;

import com.ssy.lingxi.common.controller.BaseController;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.report.model.vo.response.AppBacklogNoticeVO;
import com.ssy.lingxi.report.model.vo.response.MemberTodoVO;
import com.ssy.lingxi.report.service.IAppBacklogNoticeService;
import com.ssy.lingxi.report.service.IMemberHomeService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @menu App - 报表代办相关接口
 * @author 伍将
 * @date 2020/12/30
 * @version 2.0.0
 */
@RestController
@RequestMapping("/report/mobile/todo/")
public class MobileTodoController extends BaseController {

    @Resource
    private IMemberHomeService memberHomeService;

    @Resource
    private IAppBacklogNoticeService appBacklogNoticeService;

    /**
     * 获取会员代办
     * @author 伍将
     * @date 2020/12/30
     **/
    @RequestMapping(value = "/getMemberTodo", method = RequestMethod.GET)
    public Wrapper<MemberTodoVO> getMemberTodo(HttpServletRequest httpRequest) {
        return memberHomeService.getMemberTodo(getSysUser(httpRequest));
    }

    /**
     * 获取App待办通知列表
     * @author 伍将
     * @date 2021/1/18
     **/
    @RequestMapping(value = "/getAppBacklogNoticeList", method = RequestMethod.GET)
    public Wrapper<AppBacklogNoticeVO> getAppBacklogNoticeList(HttpServletRequest httpRequest, Integer count) {
        return appBacklogNoticeService.getNoticeList(getSysUser(httpRequest), count);
    }
}
